<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .wrapper {
            width: 100%;
            height: 300px;
            min-width: 200px;
        }
        
        .wrapper>div:nth-child(1) {
            background: red;
        }
        
        .wrapper>div:nth-child(2) {
            background: green;
        }
        
        .wrapper>div:nth-child(3) {
            background: blue;
        }
        
        .wrapper>div {
            width: 33.33%;
            height: 300px;
            float: left;
        }
        
        @media screen and (min-width: 500px) and (max-width: 1000px) {
            .wrapper>div:nth-child(1),
            .wrapper>div:nth-child(2) {
                width: 50%;
            }
            .wrapper>div:nth-child(3) {
                width: 100%;
            }
        }
        
        @media screen and (max-width: 500px) {
            .wrapper>div {
                width: 100%;
                height: 300px;
                float: left;
            }
        }
    </style>
</head>

<body>
    <div class="wrapper">
        <div class="one"></div>
        <div class="two"></div>
        <div class="three"></div>
    </div>


    <script>
        var chnNumChar = {
            零: 0,
            一: 1,
            二: 2,
            三: 3,
            四: 4,
            五: 5,
            六: 6,
            七: 7,
            八: 8,
            九: 9
        };
        var chnNameValue = {
            十: {
                value: 10,
                secUnit: false
            },
            百: {
                value: 100,
                secUnit: false
            },
            千: {
                value: 1000,
                secUnit: false
            },
            万: {
                value: 10000,
                secUnit: true
            }
        }

        function chineseToNumber(chnStr) {
            var rtn = 0;
            var section = 0;
            var number = 0;
            var secUnit = false;
            var str = chnStr.split('');

            for (var i = 0; i < str.length; i++) {
                var num = chnNumChar[str[i]];

                if (typeof num !== 'undefined') {
                    number = num;
                    if (i === str.length - 1) {
                        section += number;
                    }
                } else {
                    var unit = chnNameValue[str[i]].value;
                    secUnit = chnNameValue[str[i]].secUnit;
                    if (secUnit) {
                        section = (section + number) * unit;
                        rtn += section;
                        section = 0;
                    } else {
                        section += (number * unit);
                    }
                    number = 0;
                }
            }
            return rtn + section;
        }
        console.log(chineseToNumber('三千五百万'));
    </script>
</body>

</html>